﻿using System;
using System.IO;
using System.Net;
using System.Text;
using System.Web.UI;

namespace NO.ONE.Web {
    public partial class _default : Page {

        protected void Page_Load(object sender, EventArgs e) {


            StringBuilder sb = new StringBuilder("https://api.weibo.com/oauth2/authorize");
            sb.AppendFormat("?client_id={0}", "3414937649");
            sb.AppendFormat("&redirect_uri={0}", "http://www.anntasy.com/SinaCallBack");

            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(sb.ToString());
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            Stream stream = response.GetResponseStream();

            string result = string.Empty;

            using (StreamReader streamReader = new StreamReader(stream)) {
                result = streamReader.ReadToEnd();
            }
        }
    }
}